import { http } from '@/core/http';

import { IConfig } from './type';

export const getOssConfig = () => {
  return http.get<IConfig.IConfigResponse>({
    url: '/oss/query/self',
    isLoading: false
  });
};
export const updateOssConfig = (data: IConfig.IConfigUpdateRequest) => {
  return http.put<IConfig.IConfigResponse>({
    url: '/oss/update',
    isLoading: false,
    isShowSuccessText: true,
    data
  });
};
export const addOssConfig = (data: IConfig.IConfigAddRequest) => {
  return http.post({
    url: '/oss/upload',
    isLoading: false,
    isShowSuccessText: true,
    data
  });
};
